//
//  JMPlatform.h
//  JMLibrary
//
//  Created by zhengxianda on 2018/7/24.
//

#import <Foundation/Foundation.h>

#import "JMShareChannel.h"
#import "JMShareMessageObject.h"
#import "JMShareHandler.h"

@interface JMPlatform : NSObject

@property(nonatomic, strong) NSString * errorDomain;
@property(nonatomic, strong) JMShareRequestHandler handler;

- (void)registerApp:(NSString *)appId;

- (BOOL)handleOpenURL:(NSURL *)url;

- (void)shareToChannel:(JMShareChannel)channel
         messageObject:(JMShareMessageObject *)messageObject
               handler:(JMShareRequestHandler)handler;

- (NSString *)errorMsgWithCode:(int)code;
- (void)callHandlerWithCode:(int)errorCode;
- (void)callHandlerWithError:(NSError *)error;

@end
